﻿namespace PrearrangedChaos.AgileZen.Service
{
    internal class IntegerStringFilter : IIntegerStringFilter
    {
        private readonly string _filterName;

        internal IntegerStringFilter(string filterName)
        {
            this._filterName = filterName;
        }

        public ZenFilter Is(int value)
        {
            return new ZenFilter(string.Format("{0}:\"{1}\"", this._filterName, value.ToString()));
        }

        public ZenFilter IsNot(int value)
        {
            return new ZenFilter(string.Format("not({0}:\"{1}\")", this._filterName, value.ToString()));
        }

        public ZenFilter Is(string value)
        {
            return new ZenFilter(string.Format("{0}:\"{1}\"", this._filterName, value));
        }

        public ZenFilter IsNot(string value)
        {
            return new ZenFilter(string.Format("not({0}:\"{1}\")", this._filterName, value));
        }
    }
}